Optimal. Leaf size=471 \[ -\frac{x \left (x^2 \left (-c^2 (2 a f+b e)+b c (3 a g+b f)+b^3 (-g)+2 c^3 d\right )-a b^2 g+b c (a f+c d)-2 a c (c e-a g)\right )}{2 c^2 \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}-\frac{\tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right ) \left (\frac{b^2 c (19 a g+c e)-4 b c^2 (2 a f+c d)+4 a c^2 (c e-5 a g)-3 b^4 g+b^3 c f}{\sqrt{b^2-4 a c}}-c^2 (b e-6 a f)-b c (13 a g+b f)+3 b^3 g+2 c^3 d\right )}{2 \sqrt{2} c^{5/2} \left (b^2-4 a c\right ) \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{\tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right ) \left (-\frac{b^2 c (19 a g+c e)-4 b c^2 (2 a f+c d)+4 a c^2 (c e-5 a g)-3 b^4 g+b^3 c f}{\sqrt{b^2-4 a c}}-c^2 (b e-6 a f)-b c (13 a g+b f)+3 b^3 g+2 c^3 d\right )}{2 \sqrt{2} c^{5/2} \left (b^2-4 a c\right ) \sqrt{\sqrt{b^2-4 a c}+b}}+\frac{g x}{c^2} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 15.8233, antiderivative size = 471, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 35, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.114 \[ -\frac{x \left (x^2 \left (-c^2 (2 a f+b e)+b c (3 a g+b f)+b^3 (-g)+2 c^3 d\right )-a b^2 g+b c (a f+c d)-2 a c (c e-a g)\right )}{2 c^2 \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}-\frac{\tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right ) \left (\frac{b^2 c (19 a g+c e)-4 b c^2 (2 a f+c d)+4 a c^2 (c e-5 a g)-3 b^4 g+b^3 c f}{\sqrt{b^2-4 a c}}-c^2 (b e-6 a f)-b c (13 a g+b f)+3 b^3 g+2 c^3 d\right )}{2 \sqrt{2} c^{5/2} \left (b^2-4 a c\right ) \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{\tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right ) \left (-\frac{b^2 c (19 a g+c e)-4 b c^2 (2 a f+c d)+4 a c^2 (c e-5 a g)-3 b^4 g+b^3 c f}{\sqrt{b^2-4 a c}}-c^2 (b e-6 a f)-b c (13 a g+b f)+3 b^3 g+2 c^3 d\right )}{2 \sqrt{2} c^{5/2} \left (b^2-4 a c\right ) \sqrt{\sqrt{b^2-4 a c}+b}}+\frac{g x}{c^2} \]
Antiderivative was successfully verified.
[In] Int[(x^2*(d + e*x^2 + f*x^4 + g*x^6))/(a + b*x^2 + c*x^4)^2,x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 168.249, size = 547, normalized size = 1.16 \[ \frac{g x}{c^{2}} + \frac{x \left (- 2 a^{2} c g + a b^{2} g - a b c f + 2 a c^{2} e - b c^{2} d + x^{2} \left (- 3 a b c g + 2 a c^{2} f + b^{3} g - b^{2} c f + b c^{2} e - 2 c^{3} d\right )\right )}{2 c^{2} \left (- 4 a c + b^{2}\right ) \left (a + b x^{2} + c x^{4}\right )} - \frac{\sqrt{2} \left (b \left (- 13 a b c g + 6 a c^{2} f + 3 b^{3} g - b^{2} c f - b c^{2} e + 2 c^{3} d\right ) - 2 c \left (- 10 a^{2} c g + 3 a b^{2} g - a b c f + 2 a c^{2} e - b c^{2} d\right ) + \sqrt{- 4 a c + b^{2}} \left (- 13 a b c g + 6 a c^{2} f + 3 b^{3} g - b^{2} c f - b c^{2} e + 2 c^{3} d\right )\right ) \operatorname{atan}{\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b + \sqrt{- 4 a c + b^{2}}}} \right )}}{4 c^{\frac{5}{2}} \sqrt{b + \sqrt{- 4 a c + b^{2}}} \left (- 4 a c + b^{2}\right )^{\frac{3}{2}}} + \frac{\sqrt{2} \left (b \left (- 13 a b c g + 6 a c^{2} f + 3 b^{3} g - b^{2} c f - b c^{2} e + 2 c^{3} d\right ) - 2 c \left (- 10 a^{2} c g + 3 a b^{2} g - a b c f + 2 a c^{2} e - b c^{2} d\right ) - \sqrt{- 4 a c + b^{2}} \left (- 13 a b c g + 6 a c^{2} f + 3 b^{3} g - b^{2} c f - b c^{2} e + 2 c^{3} d\right )\right ) \operatorname{atan}{\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b - \sqrt{- 4 a c + b^{2}}}} \right )}}{4 c^{\frac{5}{2}} \sqrt{b - \sqrt{- 4 a c + b^{2}}} \left (- 4 a c + b^{2}\right )^{\frac{3}{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate(x**2*(g*x**6+f*x**4+e*x**2+d)/(c*x**4+b*x**2+a)**2,x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 4.39267, size = 575, normalized size = 1.22 \[ \frac{-\frac{2 \sqrt{c} x \left (2 c \left (a^2 g-a c \left (e+f x^2\right )+c^2 d x^2\right )+b^2 \left (c f x^2-a g\right )+b c \left (a \left (f+3 g x^2\right )+c \left (d-e x^2\right )\right )+b^3 (-g) x^2\right )}{\left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}-\frac{\sqrt{2} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right ) \left (2 c^2 \left (-10 a^2 g+c d \sqrt{b^2-4 a c}+3 a f \sqrt{b^2-4 a c}+2 a c e\right )-b c \left (c e \sqrt{b^2-4 a c}+13 a g \sqrt{b^2-4 a c}+8 a c f+4 c^2 d\right )+b^2 c \left (-f \sqrt{b^2-4 a c}+19 a g+c e\right )+b^3 \left (3 g \sqrt{b^2-4 a c}+c f\right )-3 b^4 g\right )}{\left (b^2-4 a c\right )^{3/2} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{\sqrt{2} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right ) \left (2 c^2 \left (10 a^2 g+c d \sqrt{b^2-4 a c}+3 a f \sqrt{b^2-4 a c}-2 a c e\right )+b c \left (-c e \sqrt{b^2-4 a c}-13 a g \sqrt{b^2-4 a c}+8 a c f+4 c^2 d\right )-b^2 c \left (f \sqrt{b^2-4 a c}+19 a g+c e\right )+b^3 \left (3 g \sqrt{b^2-4 a c}-c f\right )+3 b^4 g\right )}{\left (b^2-4 a c\right )^{3/2} \sqrt{\sqrt{b^2-4 a c}+b}}+4 \sqrt{c} g x}{4 c^{5/2}} \]
Antiderivative was successfully verified.
[In] Integrate[(x^2*(d + e*x^2 + f*x^4 + g*x^6))/(a + b*x^2 + c*x^4)^2,x]
[Out]
_______________________________________________________________________________________
Maple [B] time = 0.093, size = 7318, normalized size = 15.5 \[ \text{output too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int(x^2*(g*x^6+f*x^4+e*x^2+d)/(c*x^4+b*x^2+a)^2,x)
[Out]
_______________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \[ -\frac{{\left (2 \, c^{3} d - b c^{2} e +{\left (b^{2} c - 2 \, a c^{2}\right )} f -{\left (b^{3} - 3 \, a b c\right )} g\right )} x^{3} +{\left (b c^{2} d - 2 \, a c^{2} e + a b c f -{\left (a b^{2} - 2 \, a^{2} c\right )} g\right )} x}{2 \,{\left (a b^{2} c^{2} - 4 \, a^{2} c^{3} +{\left (b^{2} c^{3} - 4 \, a c^{4}\right )} x^{4} +{\left (b^{3} c^{2} - 4 \, a b c^{3}\right )} x^{2}\right )}} + \frac{g x}{c^{2}} + \frac{\int \frac{b c^{2} d - 2 \, a c^{2} e + a b c f -{\left (2 \, c^{3} d - b c^{2} e -{\left (b^{2} c - 6 \, a c^{2}\right )} f +{\left (3 \, b^{3} - 13 \, a b c\right )} g\right )} x^{2} -{\left (3 \, a b^{2} - 10 \, a^{2} c\right )} g}{c x^{4} + b x^{2} + a}\,{d x}}{2 \,{\left (b^{2} c^{2} - 4 \, a c^{3}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((g*x^6 + f*x^4 + e*x^2 + d)*x^2/(c*x^4 + b*x^2 + a)^2,x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((g*x^6 + f*x^4 + e*x^2 + d)*x^2/(c*x^4 + b*x^2 + a)^2,x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(x**2*(g*x**6+f*x**4+e*x**2+d)/(c*x**4+b*x**2+a)**2,x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [F(-2)] time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: TypeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((g*x^6 + f*x^4 + e*x^2 + d)*x^2/(c*x^4 + b*x^2 + a)^2,x, algorithm="giac")
[Out]